package com.mylib.libcore.utils;
import android.view.Gravity;
import android.view.View;
import com.mylib.libcore.dialog.BottomRecyclePopupWindow;
import java.util.List;


/**
 * @Author: cl
 * @CreateDate: 2020/9/4 10:15
 * @UpdateRemark:
 */
public class DialogUtil {

    //通用底部弹框
    public static void showCommonBottomRecycleDialog(View parent, BottomRecyclePopupWindow.ItemClink itemClink, String type, List<String> listText){
        try {
            BottomRecyclePopupWindow dialog = new BottomRecyclePopupWindow(parent.getContext(),itemClink,type,listText);
            //显示窗口
            //设置layout在PopupWindow中显示的位置
            if(!UIUtils.isEmpty(parent)){
                dialog.showAtLocation(parent, Gravity.BOTTOM, 0, 0);
            }
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
